<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // https://juejin.cn/post/6992604617045442568
      // 方法一 for循环

      // 展开运算符
      // console.log(new Array(10).keys());
      console.log([...new Array(10).keys()]);
      console.log(Array.from({ length: 10 }));
    </script>
  </body>
</html>
